package com.zx.template.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author szh
 * @date 2022/8/3 14:10
 */
@Data
@ApiModel("baseDto")
public class BaseDto<T> implements Serializable {

    private static final long serialVersionUID = -4448171502381875176L;

    @ApiModelProperty("主键id")
    @NotNull(message = "主键id 不能为空", groups = {ValidationGroup.Modify.class})
    private Long id;


    @ApiModelProperty("当前页码")
    @NotNull(message = "当前页码不能为空", groups = {ValidationGroup.Page.class})
    private Long current;

    @ApiModelProperty("每页条数")
    @NotNull(message = "每页条数不能为空", groups = {ValidationGroup.Page.class})
    private Long size;


    @ApiModelProperty("筛选起始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date qStartTime;

    @ApiModelProperty("筛选结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date qEndTime;




}
